//登录注册模块路由
const express = require('express')

const router = express.Router()//使用express框架的路由
const loginHandler = require('../router_handle/login')//引入login的路由处理模块
const expressJoi = require('@escook/express-joi')// 导入expreJoi
const { login_limit } = require('../limit/login.js')// 导入验证规则

// 注册
router.post('/register', expressJoi(login_limit), loginHandler.register)
// 登录
router.post('/login', expressJoi(login_limit), loginHandler.login)

module.exports = router//向外暴露路由

